<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: HostState Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00098.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">HostState Class Reference<div class="ingroups"><a class="el" href="a00530.html">Power consumption - Classes using/defining power consumption</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="HostState" -->
<p><a class="el" href="a00098.html" title="HostState is published by the battery to announce host failure.">HostState</a> is published by the battery to announce host failure.  
 <a href="a00098.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00307_source.html">HostState.h</a>&gt;</code></p>

<p><a href="a00759.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3c">States</a> { <br/>
&#160;&#160;<b>ACTIVE</b>, 
<a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3ca1a8705dd49a3297fc8512a1ac63b78e7">FAILED</a>, 
<a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3caad59622a148c4a5f0db2fd6c9fc8640d">BROKEN</a>, 
<a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3ca7270c313de38886faaab80c7dd9b9864">SLEEP</a>, 
<br/>
&#160;&#160;<a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3ca7c7320a0c872c90c3a26adfa4eb48412">OFF</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Possible host states.  <a href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3c">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9826824b5332180e2bedd17929b8f64d"></a><!-- doxytag: member="HostState::HostState" ref="a9826824b5332180e2bedd17929b8f64d" args="(States state=ACTIVE)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#a9826824b5332180e2bedd17929b8f64d">HostState</a> (<a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3c">States</a> <a class="el" href="a00098.html#a891b154c7213fb04e5f3d42fdc22b0d3">state</a>=ACTIVE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor taking a state. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3167de707748fd5280fce231d6cbcf90"></a><!-- doxytag: member="HostState::get" ref="a3167de707748fd5280fce231d6cbcf90" args="() const " -->
<a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3c">States</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#a3167de707748fd5280fce231d6cbcf90">get</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the host state. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a403e773f87d00a6c66f3f017441de752"></a><!-- doxytag: member="HostState::set" ref="a403e773f87d00a6c66f3f017441de752" args="(States s)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#a403e773f87d00a6c66f3f017441de752">set</a> (<a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3c">States</a> s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the host state. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3b7466f384edafc0214e39265e27fef2"></a><!-- doxytag: member="HostState::info" ref="a3b7466f384edafc0214e39265e27fef2" args="() const " -->
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#a3b7466f384edafc0214e39265e27fef2">info</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns information about the current state. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a891b154c7213fb04e5f3d42fdc22b0d3"></a><!-- doxytag: member="HostState::state" ref="a891b154c7213fb04e5f3d42fdc22b0d3" args="" -->
<a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3c">States</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#a891b154c7213fb04e5f3d42fdc22b0d3">state</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Host state. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="a00098.html" title="HostState is published by the battery to announce host failure.">HostState</a> is published by the battery to announce host failure. </p>
<p><a class="el" href="a00098.html" title="HostState is published by the battery to announce host failure.">HostState</a> information is published by the Battery to announce Host failure due to battery depletion. (Default state is ON, OFF is not used; existing modules basically ignore everything but FAIL.)</p>
<p>All modules that generate messages and collect statistics should subscribe to this notification. Should eventually be generalized to handle more general <a class="el" href="a00098.html" title="HostState is published by the battery to announce host failure.">HostState</a> (e.g. stochastic failure, restart). </p>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a5002302e0f07bbd982c6e5d65eaa9c3c"></a><!-- doxytag: member="HostState::States" ref="a5002302e0f07bbd982c6e5d65eaa9c3c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3c">HostState::States</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Possible host states. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a5002302e0f07bbd982c6e5d65eaa9c3ca1a8705dd49a3297fc8512a1ac63b78e7"></a><!-- doxytag: member="FAILED" ref="a5002302e0f07bbd982c6e5d65eaa9c3ca1a8705dd49a3297fc8512a1ac63b78e7" args="" -->FAILED</em>&nbsp;</td><td>
<p>Host is active and fully working </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a5002302e0f07bbd982c6e5d65eaa9c3caad59622a148c4a5f0db2fd6c9fc8640d"></a><!-- doxytag: member="BROKEN" ref="a5002302e0f07bbd982c6e5d65eaa9c3caad59622a148c4a5f0db2fd6c9fc8640d" args="" -->BROKEN</em>&nbsp;</td><td>
<p>Host is not active because of some failure but might able to be restarted </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a5002302e0f07bbd982c6e5d65eaa9c3ca7270c313de38886faaab80c7dd9b9864"></a><!-- doxytag: member="SLEEP" ref="a5002302e0f07bbd982c6e5d65eaa9c3ca7270c313de38886faaab80c7dd9b9864" args="" -->SLEEP</em>&nbsp;</td><td>
<p>Host is not active because of some failure and won't be able to be restarted </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a5002302e0f07bbd982c6e5d65eaa9c3ca7c7320a0c872c90c3a26adfa4eb48412"></a><!-- doxytag: member="OFF" ref="a5002302e0f07bbd982c6e5d65eaa9c3ca7c7320a0c872c90c3a26adfa4eb48412" args="" -->OFF</em>&nbsp;</td><td>
<p>Host is not active (sleeping) Host is not active (shut down) </p>
</td></tr>
</table>
</dd>
</dl>
<div class="fragment"><pre class="fragment">        {
            ACTIVE, 
            <a class="code" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3ca1a8705dd49a3297fc8512a1ac63b78e7">FAILED</a>, 
            <a class="code" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3caad59622a148c4a5f0db2fd6c9fc8640d">BROKEN</a>, 
            <a class="code" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3ca7270c313de38886faaab80c7dd9b9864">SLEEP</a>, 
            <a class="code" href="a00098.html#a5002302e0f07bbd982c6e5d65eaa9c3ca7c7320a0c872c90c3a26adfa4eb48412">OFF</a>
        };
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/utils/<a class="el" href="a00307_source.html">HostState.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00098.html">HostState</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
